#include<iostream>
#include<vector>
using namespace std;
vector<string>ans,res;
string s1;
int main()
{
	while(cin>>s1){
		ans.push_back(s1);
	}
	int n=ans.size();
	for(int i=n-1;i>=0;i--){
		res.push_back(ans[i]);
	}
	for(auto x:res){
		cout<<x<<" ";
	}
	return 0;
}
